package com.veryUsedCar.service.impl;

import com.veryUsedCar.entity.Conllection;
import com.veryUsedCar.mapper.ConllectionMapper;
import com.veryUsedCar.service.CollcetionService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * author  woo
 * date 2022/11/19 18:53
 * 描述：
 */
public class CollcetionServiceImpl implements CollcetionService {
    @Autowired
    private ConllectionMapper conllectionMapper;
    @Override
    public List<Long> selectPerson(Long aLong) {
        Map<String,Object> map = new HashMap<>();
        map.put("ci_id",aLong);
        List<Conllection> selectByMap = conllectionMapper.selectByMap(map);

        List<Long> list = new ArrayList<>();
        for (int i = 0; i < selectByMap.size(); i++) {
            Long personId = selectByMap.get(i).getPersonId();
            list.add(personId);
        }
        return list;
    }
}
